package vip.liux.backend.adapter.web;

import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import vip.liux.application.dots.PagedResultDto;
import vip.liux.backend.application.service.pay.PayTransferService;
import vip.liux.backend.application.service.pay.dto.transfer.PayTransferDto;
import vip.liux.backend.application.service.pay.dto.transfer.PayTransferQueryDto;

@RestController
@RequestMapping("/api/pay/transfer")
public class PayTransferController {

    @Resource
    private PayTransferService payTransferService;

    @GetMapping("/{id}")
    public PayTransferDto getRefund(@PathVariable Long id) {
        return payTransferService.getTransfer(id);
    }

    @GetMapping("/page")
    public PagedResultDto<PayTransferDto> getTransferPage(PayTransferQueryDto pageDto) {
        return payTransferService.getTransferPage(pageDto);
    }
}
